﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class cms_account_accountAanmaak : System.Web.UI.Page
{
    debioscoopEntities context = new debioscoopEntities();

    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {



        }
    }
    protected void btnSubmit_Click(object sender, EventArgs e)
    {
        

    }
    protected void tbWachtwoord_TextChanged(object sender, EventArgs e)
    {
    }

    protected void tbGebruikersnaam_TextChanged(object sender, EventArgs e)
    {
        var query = from a in context.accounts
                    select a;
        bool found = false;

        foreach (var a in query.ToList())
        {
            if (a.gebruikersnaam == tbGebruikersnaam.Text)
                found = true;
        }

        if (found)
            lblGebruikersnaam.Text = "Sorry, uw gewenste gebruikersnaam is al in gebruik";
        else
            lblGebruikersnaam.Text = "Gebruikersnaam is goedgekeurt";
    }
    protected void tbWachtwoord2_TextChanged(object sender, EventArgs e)
    {

    }
}